<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.20"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>libevdev: libevdev-internal test suite</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
<link href="libevdevdoxygen.css" rel="stylesheet" type="text/css"/>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="doxy-boot.js"></script>
    </head>
    <body>
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">libevdev 1.10.0</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">libevdev-internal test suite </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>libevdev's internal test suite uses the <a href="http://check.sourceforge.net/">Check unit testing framework</a>.</p>
<p>Tests are divided into test suites and test cases. Most tests create a uinput device, so you'll need to run as root, and your kernel must have <code>CONFIG_INPUT_UINPUT</code> enabled.</p>
<p>To run a specific suite only: </p><pre class="fragment">export CK_RUN_SUITE="suite name"
</pre><p>To run a specific test case only: </p><pre class="fragment">export CK_RUN_TEST="test case name"
</pre><p>To get a list of all suites or tests: </p><pre class="fragment">git grep "suite_create"
git grep "tcase_create"
</pre><p>By default, Check forks, making debugging harder. The test suite tries to detect if it is running inside gdb and disable forking. If that doesn't work for some reason, run gdb as below to avoid forking. </p><pre class="fragment">sudo CK_FORK=no CK_RUN_TEST="test case name" gdb ./test/test-libevdev
</pre><p>A special target <code>make gcov-report.txt</code> exists that runs gcov and leaves a <code>libevdev.c.gcov</code> file. Check that for test coverage.</p>
<p><code>make check</code> is hooked up to run the test and gcov (again, needs root).</p>
<p>The test suite creates a lot of devices, very quickly. Add the following xorg.conf.d snippet to avoid the devices being added as X devices (at the time of writing, mutter can't handle these devices and exits after getting a BadDevice error). </p><pre class="fragment">$ cat /etc/X11/xorg.conf.d/99-ignore-libevdev-devices.conf
Section "InputClass"
        Identifier "Ignore libevdev test devices"
        MatchProduct "libevdev test device"
        Option "Ignore" "on"
EndSection
</pre> </div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.20
</small></address>
</body>
</html>
